import Vue from 'vue'
import Router from 'vue-router'

import search from '@/pages/search/search' //搜索
import home from '@/pages/home/home.vue' //首页--也就是发现音乐
import mv from '@/pages/mv/mv.vue'       //MV
import friend from '@/pages/friend/friend' //朋友
import local from '@/pages/local/local'  //本地音乐
import download from '@/pages/download/download' //下载管理
import lately from '@/pages/lately/lately' //最近播放
import love from '@/pages/love/love' //我喜欢的音乐

// 跳转到详情页
import songlistd from '@/pages/detail/songlistd' //歌单详情页
import singerd from '@/pages/detail/singerd'  //歌手详情页
import albumd from '@/pages/detail/albumd'   //专辑详情

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: home,
      redirect:'/home'
    },
    {
      path: '/home',
      name: 'home',
      component: home,
    },
    {
      path: '/mv',
      name: 'mv',
      component: mv,
    },
    {
      path: '/local',
      name: 'local',
      component: local,
    },
    {
      path: '/download',
      name: 'download',
      component: download,
    },
    {
      path: '/lately',
      name: 'lately',
      component: lately,
    },
    {
      path: '/search',
      name: 'search',
      component: search,
    },
    {
      path: '/friend',
      name: 'friend',
      component: friend,
    },
    {
      path: '/love',
      name: 'love',
      component: love,
    },
    {
      path: '/songlistd',
      name: 'songlistd',
      component: songlistd,
    },
    {
      path: '/singerd',
      name: 'singerd',
      component: singerd,
    },
    {
      path: '/albumd',
      name: 'albumd',
      component: albumd,
    },
  ]
})
